﻿using System;
using GurLoader.Service.ImgurTaskBuilder;
using Imgur.Net;
using NUnit.Framework;

namespace GurLoaderWPF.Test.Service.ImgurTaskBuilder
{
    [TestFixture]
    public class AlbumUploadResultTests
    {
        [Test]
        public void CreateInstanceTest()
        {
            AlbumInfo albumInfo = new AlbumInfo("abcd", string.Empty, string.Empty, DateTime.Now, LayoutStyle.Blog, 0,
                string.Empty, string.Empty);

            AlbumUploadResult result = new AlbumUploadResult(albumInfo);
            Assert.IsNotNull(result);
        }

        [Test]
        [ExpectedException(typeof(ArgumentException), ExpectedMessage = "albumInfo must not be null.")]
        public void CreateInstanceNullTest()
        {
            AlbumUploadResult result = new AlbumUploadResult(null);
        }

        [Test]
        public void GetAlbumInfoTest()
        {
            AlbumInfo albumInfo = new AlbumInfo("abcd", string.Empty, string.Empty, DateTime.Now, LayoutStyle.Blog, 0,
                string.Empty, string.Empty);

            AlbumUploadResult result = new AlbumUploadResult(albumInfo);
            Assert.IsNotNull(result);

            Assert.AreEqual(albumInfo, result.AlbumInfo);
        }
    }
}
